package com.escape.auth.common.enums;

import lombok.Getter;

@Getter
public enum AuthPermissionStatusEnum {
    OPEN(0,"启动"),
    CLOSE(1,"禁用");

    private Integer code;
    private String desc;

    AuthPermissionStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthPermissionStatusEnum getByCode(int code) {
        for (AuthPermissionStatusEnum authUserStatusEnum : AuthPermissionStatusEnum.values()) {
            if (authUserStatusEnum.code == code) {
                return authUserStatusEnum;
            }
        }
        return null;
    }
}
